package character.race;

import character.Gender;
import utilities.MinMaxPair;

/**
 * Class storing min and max values for the two genders.
 * @author pcdejager
 * @param <T> The type
 */
public final class GenderMinMaxValues<T> {
    /**
     * Constructor.
     * @param maleMinMax Min/Max values for male
     * @param femaleMinMax Min/Max values for female
     */
    public GenderMinMaxValues(
            final MinMaxPair<T> maleMinMax,
            final MinMaxPair<T> femaleMinMax) {
        male = maleMinMax;
        female = femaleMinMax;
    }
    /**
     * Get the female min/max values.
     * @return Return values
     */
    public MinMaxPair<T> getFemale() {
        return female;
    }
    /**
     * Get the male min/max values.
     * @return Return values;
     */
    public MinMaxPair<T> getMale() {
        return male;
    }
    /**
     * Get the min/max values for specific gender.
     * @param gender The gender to find
     * @return The values for the gender
     */
    public MinMaxPair<T> get(final Gender gender) {
        if (gender == Gender.MALE) {
            return male;
        } else if (gender == Gender.FEMALE) {
            return female;
        }
        return null;
    }
    /**
     * Min/Max values for male.
     */
    private final MinMaxPair<T> male;
    /**
     * Min/Max values for female.
     */
    private final MinMaxPair<T> female;
}
